<#assign tit>私教课程预约信息 预约号:${bespeak.autoId!}</#assign>
<@page.html title=tit>
<script type="text/javascript">
  function cancelClass() {
    getJson("_cancel?id=${bespeak.autoId!}", function(data){
      window.alert(data.msg);
      if(data.ret) {
        if(window.parent && window.parent.addOk)
          window.parent.addOk();
        cancel();
      }
    })
  }

  function cancel() {
    if(window.parent && window.parent.closeWin)
      window.parent.closeWin();
    else
      window.close();
  }
</script>

<div class="kbox">
  <table class="info">
    <tr>
      <th>会员姓名</th>
      <td>${member.chName!}</td>
      <th>会员编号</th>
      <td>${member.memberCode!}</td>
    </tr>
    <tr>
      <th>预约课程</th>
      <td colspan="3">${bespeak.ptCode!} - <@value type="ptItemName" key="${bespeak.ptCode!}"/></td>
    </tr>
    <tr>
      <th>上课教练</th>
      <td colspan="3">${bespeak.coachCode!} - <@value type="ptCoachName" key="${bespeak.coachCode!}"/></td>
    </tr>
    <tr>
      <th>预约时间</th>
      <td colspan="3">${bespeak.bespeakDate?string("yyyy-MM-dd HH:mm")}</td>
    </tr>
    <tr>
      <th>上课时间</th>
      <td colspan="3">${bespeak.classTime?string("yyyy-MM-dd HH:mm")}</td>
    </tr>
  </table>
</div>
<div class="button"><#if canCancel?? && bespeak.status=2><input type="button" value="取消预约" onclick="cancelClass();"></#if><input type="button" value="返回" onclick="cancel();">
  <#if canPrint?? && prt?? && bespeak.status=2><input type="button" value="打印小票" onclick="window.open('print?id=${bespeak.autoId!}');"></#if></div>
</@page.html>